package pe.com.upc.edu.rtt;

public class UbigeoServicesSoapProxy implements pe.com.upc.edu.rtt.UbigeoServicesSoap {
  private String _endpoint = null;
  private pe.com.upc.edu.rtt.UbigeoServicesSoap ubigeoServicesSoap = null;
  
  public UbigeoServicesSoapProxy() {
    _initUbigeoServicesSoapProxy();
  }
  
  public UbigeoServicesSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initUbigeoServicesSoapProxy();
  }
  
  private void _initUbigeoServicesSoapProxy() {
    try {
      ubigeoServicesSoap = (new pe.com.upc.edu.rtt.UbigeoServicesLocator()).getUbigeoServicesSoap();
      if (ubigeoServicesSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)ubigeoServicesSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)ubigeoServicesSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (ubigeoServicesSoap != null)
      ((javax.xml.rpc.Stub)ubigeoServicesSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public pe.com.upc.edu.rtt.UbigeoServicesSoap getUbigeoServicesSoap() {
    if (ubigeoServicesSoap == null)
      _initUbigeoServicesSoapProxy();
    return ubigeoServicesSoap;
  }
  
  public pe.com.upc.edu.rtt.Ubigeo[] listarUbigeoPorNombre(java.lang.String inicialnombre) throws java.rmi.RemoteException{
    if (ubigeoServicesSoap == null)
      _initUbigeoServicesSoapProxy();
    return ubigeoServicesSoap.listarUbigeoPorNombre(inicialnombre);
  }
  
  
}